package com.serviceprovider.business.module.admin.action.model;

public class AclActionApply {
    private Integer actionId;
    private Integer classId;
    private boolean flag;
    private Integer id;
    private Integer roleId;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Integer getClassId() {
        return classId;
    }

    public void setClassId(Integer classId) {
        this.classId = classId;
    }

    public Integer getActionId() {
        return actionId;
    }

    public void setActionId(Integer actionId) {
        this.actionId = actionId;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    @Override
    public boolean equals(Object obj) {
        if ((obj == null) ||!(obj instanceof AclActionApply)) {
            return false;
        }

        AclActionApply b  = (AclActionApply) obj;
        boolean        eq = ((id == null) && (b.id == null)) || ((id != null) && id.equals(b.id));

        if (!eq) {
            return false;
        }

        eq = ((roleId == null) && (b.roleId == null)) || ((roleId != null) && roleId.equals(b.roleId));

        if (!eq) {
            return false;
        }

        eq = ((classId == null) && (b.classId == null)) || ((classId != null) && classId.equals(b.classId));

        if (!eq) {
            return false;
        }

        eq = ((actionId == null) && (b.actionId == null)) || ((actionId != null) && actionId.equals(b.actionId));

        if (!eq) {
            return false;
        }

        if (flag != b.flag) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int prime  = 31;
        int result = 1;

        result = prime * result + ((id == null)
                                   ? 0
                                   : id.hashCode());
        result = prime * result + ((roleId == null)
                                   ? 0
                                   : roleId.hashCode());
        result = prime * result + ((classId == null)
                                   ? 0
                                   : classId.hashCode());
        result = prime * result + ((actionId == null)
                                   ? 0
                                   : actionId.hashCode());
        result = prime * result + ((flag == false)
                                   ? 0
                                   : 1);

        return result;
    }
}



